home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
GameKit
/
Makefiles
/
lib
/
Makefile.install
< prev
next >
Wrap
Makefile
|
1995-06-12
|
4KB
|
121 lines
#
# NeXT common include file for Internal Makefiles
# Copyright 1987, 1991, NeXT Computer, Inc.
#
# Maintained by Doug Wiebe.
#
# This Makefile has the rules used to install files.
#
########################## Project source ##############################
# install the project source into $(SRCROOT)
installsrc:: SRCROOT
mkdirs $(MKDIRSFLAGS) $(SRCROOT)
tar cf - $(INSTALL_FILES) | (cd $(SRCROOT); tar xf -)
chmod -R a+r $(SRCROOT)/*
chmod -R a-w $(SRCROOT)/*
# cd $(SRCROOT); ln -s . $(NAME)
######################### Common ##############################
install:: DSTROOT $(OBJROOT) $(SYMROOT)
# installations done by all installs
common_install:: installhdrs installpsfiles
# install public header files
installhdrs:: DSTROOT $(OBJROOT) $(SYMROOT)
@echo '************* $(NAME) installhdrs *************'
-/bin/rm -rf $(INCDIR)
@if (test "$(PUBLIC_INCFILES)") \
then \
echo mkdirs $(MKDIRSFLAGS) $(INCDIR); \
mkdirs $(MKDIRSFLAGS) $(INCDIR); \
echo install $(IFLAGS) $(PUBLIC_INCFILES) $(INCDIR); \
install $(IFLAGS) $(PUBLIC_INCFILES) $(INCDIR); \
fi
-/bin/rm -rf $(COMPATINC)
@if (test "$(COMPAT_INCFILES)") \
then \
echo mkdirs $(MKDIRSFLAGS) $(COMPATINC); \
mkdirs $(MKDIRSFLAGS) $(COMPATINC); \
echo install $(IFLAGS) $(COMPAT_INCFILES) $(COMPATINC); \
install $(IFLAGS) $(COMPAT_INCFILES) $(COMPATINC); \
fi
-/bin/rm -rf $(LCLINC)
@if (test "$(LOCAL_INCFILES)") \
then \
echo mkdirs $(MKDIRSFLAGS) $(LCLINC); \
mkdirs $(MKDIRSFLAGS) $(LCLINC); \
echo install $(IFLAGS) $(LOCAL_INCFILES) $(LCLINC); \
install $(IFLAGS) $(LOCAL_INCFILES) $(LCLINC); \
fi
# installs the PostScript package files
installpsfiles::
@echo '************* $(NAME) installpsfiles *************'
@if (test "$(PSFILES)") \
then \
if [ -d $(PSLIBDIR) ] ; then \
(cd $(PSLIBDIR); /bin/rm -rf $(PSFILES)); \
fi; \
echo mkdirs $(MKDIRSFLAGS) $(PSLIBDIR); \
mkdirs $(MKDIRSFLAGS) $(PSLIBDIR); \
echo install $(IFLAGS) -m 444 $(PSFILES) $(PSLIBDIR); \
install $(IFLAGS) -m 444 $(PSFILES) $(PSLIBDIR); \
fi
####################### Library installations #########################
inst_product:: $(LIBDIR) $(PRODUCT)
cd $(SYMROOT); install $(IFLAGS) `basename $(PRODUCT)` $(LIBDIR)
ranlib $(RANLIBFLAGS) $(LIBDIR)/$(PRODUCT)
optimized_install::
@echo '************* $(NAME) Optimized install *************'
@$(MAKE) inst_product \
"PRODUCT = $(OPT_LIB)" \
"OFILE_DIR = $(OBJROOT)/$(OPT_OBJ)" \
"SYMROOT = $(SYMROOT)" \
"OBJROOT = $(OBJROOT)" \
"CFLAGS = $(OPTCFLAGS)"
debug_install::
@echo '*************** $(NAME) Debug install ***************'
@$(MAKE) inst_product \
"PRODUCT = $(DEBUG_LIB)" \
"OFILE_DIR = $(OBJROOT)/$(DEBUG_OBJ)" \
"SYMROOT = $(SYMROOT)" \
"OBJROOT = $(OBJROOT)" \
"CFLAGS = $(DEBUGCFLAGS)"
profile_install::
@echo '************** $(NAME) Profile install **************'
@$(MAKE) inst_product \
"PRODUCT = $(PROFILE_LIB)" \
"OFILE_DIR = $(OBJROOT)/$(PROFILE_OBJ)" \
"SYMROOT = $(SYMROOT)" \
"OBJROOT = $(OBJROOT)" \
"CFLAGS = $(PROFCFLAGS)"
# makes sure these directories exists
$(LIBDIR) $(OBJROOT) $(SYMROOT)::
@if [ ! -d $@ ] ; then \
echo mkdirs $(MKDIRSFLAGS) $@ ; \
mkdirs $(MKDIRSFLAGS) $@ ; \
fi
# makes sure these variables are set
SRCROOT DSTROOT:
@if [ -n "${$@}" ]; \
then \
exit 0; \
else \
echo Must define $@; \
exit 1; \
fi